<!--
 * @Author: zqx me_zqx@163.com
 * @Date: 2024-11-20 15:16:12
 * @LastEditors: zqx me_zqx@163.com
 * @LastEditTime: 2025-02-26 14:48:31
 * @FilePath: /XMate-h5/src/components/customCheckBox.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div @click.stop="handleClick" class="w-[18px]">
    <img v-if="half" src="@/assets/checked_half.png" alt="" />
    <img v-else-if="checked" src="@/assets/checked.png" alt="" />
    <img v-else src="@/assets/uncheck.png" alt="" />
  </div>
</template>

<script setup>
import { ref, defineProps, defineEmits } from "vue";

const props = defineProps({
  checked: {
    type: Boolean,
    default: false
  },
  half: {
    type: Boolean,
    default: false
  }
});

const emits = defineEmits(["onClick"]);

function handleClick() {
  emits("onClick");
}
</script>

<style lang="less" scoped></style>
